package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallGoodsStage;
import com.appkubes.mall.core.po.MallGoodsStageExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallGoodsStageMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsStageSqlProvider.class, method="countByExample")
    long countByExample(MallGoodsStageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallGoodsStageSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallGoodsStageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_goods_stage",
        "where goods_stage_key = #{goodsStageKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String goodsStageKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_goods_stage (goods_stage_key, app_key, ",
        "good_key, `months`, ",
        "rate, create_time, ",
        "update_time, `checked`, ",
        "version)",
        "values (#{goodsStageKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{goodKey,jdbcType=VARCHAR}, #{months,jdbcType=INTEGER}, ",
        "#{rate,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{checked,jdbcType=TINYINT}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallGoodsStage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallGoodsStageSqlProvider.class, method="insertSelective")
    int insertSelective(MallGoodsStage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsStageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_stage_key", property="goodsStageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="months", property="months", jdbcType=JdbcType.INTEGER),
        @Result(column="rate", property="rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="checked", property="checked", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsStage> selectByExampleWithRowbounds(MallGoodsStageExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsStageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_stage_key", property="goodsStageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="months", property="months", jdbcType=JdbcType.INTEGER),
        @Result(column="rate", property="rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="checked", property="checked", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsStage> selectByExample(MallGoodsStageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "goods_stage_key, app_key, good_key, `months`, rate, create_time, update_time, ",
        "`checked`, version",
        "from mall_goods_stage",
        "where goods_stage_key = #{goodsStageKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="goods_stage_key", property="goodsStageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="months", property="months", jdbcType=JdbcType.INTEGER),
        @Result(column="rate", property="rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="checked", property="checked", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallGoodsStage selectByPrimaryKey(String goodsStageKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsStageSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallGoodsStage record, @Param("example") MallGoodsStageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsStageSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallGoodsStage record, @Param("example") MallGoodsStageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsStageSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallGoodsStage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_stage
     *
     * @mbg.generated
     */
    @Update({
        "update mall_goods_stage",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "good_key = #{goodKey,jdbcType=VARCHAR},",
          "`months` = #{months,jdbcType=INTEGER},",
          "rate = #{rate,jdbcType=DECIMAL},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "`checked` = #{checked,jdbcType=TINYINT},",
          "version = #{version,jdbcType=INTEGER}",
        "where goods_stage_key = #{goodsStageKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallGoodsStage record);
}